home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / music4c.sit / Music4C Folder / Sources Folder / Music4C.h < prev    next >
Text File  |  1990-06-08  |  2KB  |  74 lines

  1. /*
  2. * ⌐ Graeme Gerrard 1990
  3. * Faculty of Music, University of Melbourne
  4. * Parkville Victoria 3052 Australia.
  5. *
  6. * ARPANET: grae@murdu.ucs.unimelb.edu.au
  7. * telephone: (613) 344 4127, Fax: (613) 344 5346
  8. */
  9.  
  10. #include    <stdio.h>
  11. #include    <stdlib.h>
  12. #include    <ctype.h>
  13. #include    <string.h>
  14. #include    "ErrorAlert.h"
  15.  
  16. #define      TRUE   1
  17. #define      FALSE  0
  18. #define      NIL    0
  19. #define        MAXSTRING    128        /* max length of strings */
  20. #define        MAXCARD        255        /* max chars on a "card" */
  21. #define        MAXPARAMS    100        /* max number of event parameters */
  22. #define        MAXLINE        70        /* max length of an inout line */
  23. #define        MAXINSTRS    99        /* max number of instruments in orchestra */
  24. #define        MAXCHANS    4        /* max number of output channels */
  25. #define        CARRY_CODE    '*'        /* carry indicator for pass1 */
  26. #define        SRATE        44100.0    /* default sampling rate */
  27. #define        MAXFUNCS    100        /* max number of stored functions */
  28. #define        MAX_TEMPO_CARDS    10    /* max number of "t" cards per section */
  29.  
  30. #define        ENDOP    -1    /* terminates I or note card */
  31. #define        NULLOP    0    /* nop */
  32. #define        IOP        1    /* I or note card */
  33. #define        FOP        2    /* F or function card */
  34. #define        SOP        3    /* S or section card */
  35. #define        EOP        4    /* E or end card */
  36. #define        TOP        5    /* T or tempo card */
  37. #define        ROP        6    /* R or instrument group renumber card */
  38. #define        COP        7    /* C or comment card */
  39. #define        OOP        8    /* O or output card */
  40.  
  41. #define        SAMPBUFSZ    2048        /* buffer size for sample blocks */
  42.  
  43. #define        SAMPMAX        32767.0    /* max sample magnitude */
  44.  
  45.  
  46. #define        MAX(x,y)    (x) > (y) ? (x) : (y)
  47. #define        MIN(x,y)    (x) < (y) ? (x) : (y)
  48.  
  49. /*
  50. *    Event, singly linked list for events
  51. */
  52. typedef struct Event {
  53.         struct Event *next;        /* pointer to next event */
  54.         int op;                 /*event opcode*/
  55.         /*char op;                 event opcode */
  56.         int    nargs;            /* number of event arguments */
  57.         double *pptr;        /* pointer to parameter array */
  58. } Event;
  59.  
  60. Event *insert_in_list();
  61.  
  62.  
  63. /* sound file types */
  64. #define        AIFF                1
  65. #define        FLOAT                2
  66. #define        INT16                3
  67. #define        SD                    4
  68. #define        SD2                    5
  69.  
  70.  
  71. #define    PASS1_2_DIALOG        8
  72. #define    PASS3_DIALOG        6
  73. #define    ABOUT_DIALOG        4
  74.